package com.mxpio.erp.common.plm.vo;

import com.mxpio.erp.common.jpa.policy.ResCodeGeneratorPolicy;
import com.mxpioframework.filestorage.entity.MxpioFileInfo;
import com.mxpioframework.jpa.annotation.DictAble;
import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.HashMap;
import java.util.Map;

@Data
@Schema(description = "根任务任务下的所有交付物")
public class ProjectTaskDeliverableAll implements Serializable, DictAble {

    private static final long serialVersionUID=1L;

    /**主键*/

    @Schema(description = "主键")
    private String id;


    @Schema(description = "任务编码")
    private String taskCode;


    @Schema(description = "任务名称")
    private String taskName;



    @Schema(description = "交付物编码编码")
    private String docNO;


    @Schema(description = "交付物名称")
    private String docName;


    @Schema(description = "交付物")
    @Dict(dicCode = "fileNo", dicEntity = MxpioFileInfo.class, dicText = "fileName")
    private String docFile;


    @Schema(description = "交付物类型")
    @Dict(dicCode = "ERP_PROJECT_DELIVERABLES_DOC_TYPE")
    private String docType;


    @Schema(description = "文档模版")
    @Dict(dicCode = "fileNo", dicEntity = MxpioFileInfo.class, dicText = "fileName")
    private String docTemp;


    @Schema(description = "交付物顺序")
    private  Integer number;

    @Transient
    private Map<String, String> textMap;
    public String putText(String key, String value) {
        if (textMap == null) {
            textMap = new HashMap<>();
        }
        return textMap.put(key, value);
    }
}
